In the human body, each cell type expresses a unique assortment of proteins, lipids, sugars, nucleotide sequences, and other metabolites. Each of these is a potential antigen, having epitopes with which a molecule having predetermined affinity can interact. The expression of said antigens is modified by the status of the cell and by its environment. This expression becomes further modified when viruses or intracellular bacteria introduce foreign materials into the cell as they infect. Viruses in particular hijack the cell machinery and produce many virion copies that bud off from the cell and infect other cells.
When a person becomes infected by a virus, the immune system has various mechanisms that attempt to detect and destroy infected cells. Unfortunately, many viruses have adapted mechanisms to evade this protection and send duplicated virions to infect other cells. These adaptations succeed because the viruses have two important features: speedy replication and rapid mutation rates. Similar attributes are also characteristic of cancers, weaponized biological agents, and other infections.